Aller au contenu
Sur cette page

Plugin Template

Ce contenu n’est pas encore disponible dans votre langue.

This is a template for creating plugins for simply-xp.

const MyNewPlugin = {
name: "myPlugin", // [REQUIRED] The name of your plugin
initialize: async (xp) => {
// [REQUIRED] Called during plugin registration
// do something with xp
},
requiredVersions: ["2"], // [OPTIONAL] Recommended: match any v2 release
};
export default MyNewPlugin; // Export your plugin, so users can register it
const { registerPlugins } = require("simply-xp");
const { MyNewPlugin } = require("myPlugin");
(async () => {
await registerPlugins([MyNewPlugin]);
})().catch(console.error); // Returns the error